From a2b34cdf0f53f69624c036330dafa8ea5944e68f Mon Sep 17 00:00:00 2001 From: Michael Gilbert Date: Sun, 13 Mar 2022 04:27:41 +0000 Subject: [PATCH] build using system zlib Gbp-Pq: Topic system Gbp-Pq: Name zlib.patch --- dlls/cabinet/Makefile.in | 3 ++- dlls/cabinet/fci.c | 4 +++- dlls/dbghelp/Makefile.in | 3 ++- dlls/dbghelp/dwarf.c | 4 +++- dlls/opcservices/Makefile.in | 3 ++- dlls/opcservices/compress.c | 4 +++- dlls/wininet/Makefile.in | 3 ++- dlls/wininet/http.c | 4 +++- tools/makedep.c | 10 ++-------- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/dlls/cabinet/Makefile.in b/dlls/cabinet/Makefile.in index 6b7211a..a25d85c 100644 --- a/dlls/cabinet/Makefile.in +++ b/dlls/cabinet/Makefile.in @@ -1,11 +1,12 @@ MODULE = cabinet.dll IMPORTLIB = cabinet +EXTRA_LDFLAGS = -lz + EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ cabinet_main.c \ - deflate.c \ fci.c \ fdi.c diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c index 1b72d7c..92e968c 100644 --- a/dlls/cabinet/fci.c +++ b/dlls/cabinet/fci.c @@ -30,6 +30,9 @@ There is still some work to be done: */ +#include "zlib.h" +#undef FAR + #include #include #include @@ -42,7 +45,6 @@ There is still some work to be done: #include "winerror.h" #include "winternl.h" #include "fci.h" -#include "zlib.h" #include "cabinet.h" #include "wine/list.h" #include "wine/debug.h" diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in index a370b94..7b5bef7 100644 --- a/dlls/dbghelp/Makefile.in +++ b/dlls/dbghelp/Makefile.in @@ -3,6 +3,8 @@ IMPORTLIB = dbghelp EXTRADEFS = -D_IMAGEHLP_SOURCE_ DELAYIMPORTS = version +EXTRA_LDFLAGS = -lz + EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ @@ -15,7 +17,6 @@ C_SRCS = \ dwarf.c \ elf_module.c \ image.c \ - inflate.c \ macho_module.c \ minidump.c \ module.c \ diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 53274c4..983a0c1 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -22,6 +22,9 @@ #define NONAMELESSUNION +#include "zlib.h" +#undef FAR + #include #include #include @@ -39,7 +42,6 @@ #include "dbghelp_private.h" #include "image_private.h" -#include "zlib.h" #include "wine/debug.h" diff --git a/dlls/opcservices/Makefile.in b/dlls/opcservices/Makefile.in index b55c798..2dd110f 100644 --- a/dlls/opcservices/Makefile.in +++ b/dlls/opcservices/Makefile.in @@ -1,11 +1,12 @@ MODULE = opcservices.dll IMPORTS = uuid ole32 advapi32 urlmon xmllite oleaut32 +EXTRA_LDFLAGS = -lz + EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ compress.c \ - deflate.c \ factory.c \ package.c \ uri.c diff --git a/dlls/opcservices/compress.c b/dlls/opcservices/compress.c index 0ee8765..5bcc2ae 100644 --- a/dlls/opcservices/compress.c +++ b/dlls/opcservices/compress.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "zlib.h" +#undef FAR + #define COBJMACROS #include @@ -25,7 +28,6 @@ #include "msopc.h" #include "opc_private.h" -#include "zlib.h" #include "wine/debug.h" #include "wine/heap.h" diff --git a/dlls/wininet/Makefile.in b/dlls/wininet/Makefile.in index 88b7046..5f8b4e8 100644 --- a/dlls/wininet/Makefile.in +++ b/dlls/wininet/Makefile.in @@ -4,6 +4,8 @@ IMPORTLIB = wininet IMPORTS = mpr shlwapi shell32 user32 ws2_32 advapi32 DELAYIMPORTS = secur32 crypt32 cryptui dhcpcsvc iphlpapi +EXTRA_LDFLAGS = -lz + EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ @@ -12,7 +14,6 @@ C_SRCS = \ ftp.c \ gopher.c \ http.c \ - inflate.c \ internet.c \ netconnection.c \ urlcache.c \ diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 1eb046e..d4ee81c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -27,6 +27,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "zlib.h" +#undef FAR + #include #include "winsock2.h" @@ -53,7 +56,6 @@ #include "winuser.h" #include "internet.h" -#include "zlib.h" #include "resource.h" #include "wine/debug.h" #include "wine/exception.h" diff --git a/tools/makedep.c b/tools/makedep.c index edb243e..e39c0e4 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1567,14 +1567,6 @@ static struct file *open_include_file( const struct makefile *make, struct incl_ } } - if (pFile->type == INCL_SYSTEM && pFile->use_msvcrt) - { - if (!strcmp( pFile->name, "stdarg.h" )) return NULL; - fprintf( stderr, "%s:%d: error: system header %s cannot be used with msvcrt\n", - pFile->included_by->file->name, pFile->included_line, pFile->name ); - exit(1); - } - if (pFile->type == INCL_SYSTEM) return NULL; /* ignore system files we cannot find */ /* try in src file directory */ @@ -3297,6 +3289,7 @@ static void output_module( struct makefile *make ) { struct strarray all_libs = empty_strarray; struct strarray dep_libs = empty_strarray; + struct strarray extra_ldflags = get_expanded_make_var_array( make, "EXTRA_LDFLAGS" ); char *module_path = obj_dir_path( make, make->module ); const char *debug_file = NULL; char *spec_file = NULL; @@ -3365,6 +3358,7 @@ static void output_module( struct makefile *make ) if (debug_file) output_filename( strmake( "-Wl,--debug-file,%s", obj_dir_path( make, debug_file ))); output_filenames( all_libs ); output_filename( make->is_cross ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" ); + output_filenames( extra_ldflags ); output( "\n" ); if (make->unixobj_files.count) -- 2.30.2